﻿
-- Add a new column "To_Flow_ID"
IF NOT EXISTS (SELECT 1 FROM sys.columns WHERE [object_id] = object_id(N'dbo.UDS_Flow_Jump') AND [name] = N'To_Flow_ID')
BEGIN
    ALTER TABLE dbo.UDS_Flow_Jump ADD
        [To_Flow_ID] int NOT NULL CONSTRAINT [DF_UDS_Flow_Jump_ToFlowID] DEFAULT(0),
        CONSTRAINT [CK_UDS_Flow_Jump_ToFlowID] CHECK (To_Flow_ID >= -1);
END
GO